package com.pignest.hotel.ui.listener;

import java.util.List;

import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventThreadCleanup;

import com.pignest.framework.util.Log;
import com.pignest.hotel.system.AuthenticatorHolder;

public class ThreadCleanupListener implements EventThreadCleanup {

	@SuppressWarnings("unchecked")
	@Override
	public void cleanup(Component comp, Event evt, List errs) throws Exception {
		Log.d(comp.getClass().getSimpleName() + "\t" + Thread.currentThread().getName());
		AuthenticatorHolder.setClientSession(null);
	}

	@Override
	public void complete(Component comp, Event evt) throws Exception {
	}

}
